Assign Primary Key with an Annotation
Next, Bentley Map in a read/write setup requires the creation of a primary key for the annotation table. A primary key is required on the combination of the table’s identifier combined with the identifier it refers to in the parent table. For this, an ALTER TABLE statement is used.
For the previously created customer_text table the primary key would be added as follows:
ALTER TABLE customers_text
ADD CONSTRAINT customers_text_pk
PRIMARY KEY (customers_text_id, customers_ref);